//
//  LandmarkCell.swift
//  ChinaLandmarkDemo
//
//  Created by liy on 2025/2/10.
//


import SwiftUI

struct LandmarkCell: View {
	let landmark: Landmark
	var body: some View {
		HStack {
			Image(landmark.image)
				.resizable()
				.frame(width: 50, height: 50)
				.cornerRadius(10)
			Text(landmark.name)
			
			Spacer()
			if landmark.isFavorite {
				Image(systemName: "star.fill")
					.foregroundStyle(.yellow)
			}
		}
	}
}
#Preview {
	LandmarkCell(landmark: landmarks[0])
}
